3.244 \(\int \frac{\log (x)}{1+x^2} \, dx\)

Optimal. Leaf size=32 \[ -\frac{1}{2} i \text{PolyLog}(2,-i x)+\frac{1}{2} i \text{PolyLog}(2,i x)+\log (x) \tan ^{-1}(x) \]

[Out]

ArcTan[x]*Log[x] - (I/2)*PolyLog[2, (-I)*x] + (I/2)*PolyLog[2, I*x]

________________________________________________________________________________________

Rubi [A]  time = 0.0356959, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {203, 2324, 4848, 2391} \[ -\frac{1}{2} i \text{PolyLog}(2,-i x)+\frac{1}{2} i \text{PolyLog}(2,i x)+\log (x) \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[Log[x]/(1 + x^2),x]

[Out]

ArcTan[x]*Log[x] - (I/2)*PolyLog[2, (-I)*x] + (I/2)*PolyLog[2, I*x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 2324

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\log (x)}{1+x^2} \, dx &=\tan ^{-1}(x) \log (x)-\int \frac{\tan ^{-1}(x)}{x} \, dx\\ &=\tan ^{-1}(x) \log (x)-\frac{1}{2} i \int \frac{\log (1-i x)}{x} \, dx+\frac{1}{2} i \int \frac{\log (1+i x)}{x} \, dx\\ &=\tan ^{-1}(x) \log (x)-\frac{1}{2} i \text{Li}_2(-i x)+\frac{1}{2} i \text{Li}_2(i x)\\ \end{align*}

Mathematica [B]  time = 0.0072243, size = 65, normalized size = 2.03 \[ -\frac{1}{2} i \text{PolyLog}(2,-i x)+\frac{1}{2} i \text{PolyLog}(2,i x)-\frac{1}{2} i \log (-i (-x+i)) \log (x)+\frac{1}{2} i \log (-i (x+i)) \log (x) \]

Antiderivative was successfully verified.

[In]

Integrate[Log[x]/(1 + x^2),x]

[Out]

(-I/2)*Log[(-I)*(I - x)]*Log[x] + (I/2)*Log[x]*Log[(-I)*(I + x)] - (I/2)*PolyLog[2, (-I)*x] + (I/2)*PolyLog[2,
 I*x]

________________________________________________________________________________________

Maple [A]  time = 0.064, size = 46, normalized size = 1.4 \begin{align*} -{\frac{i}{2}}\ln \left ( x \right ) \ln \left ( 1+ix \right ) +{\frac{i}{2}}\ln \left ( x \right ) \ln \left ( 1-ix \right ) -{\frac{i}{2}}{\it dilog} \left ( 1+ix \right ) +{\frac{i}{2}}{\it dilog} \left ( 1-ix \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(x)/(x^2+1),x)

[Out]

-1/2*I*ln(x)*ln(1+I*x)+1/2*I*ln(x)*ln(1-I*x)-1/2*I*dilog(1+I*x)+1/2*I*dilog(1-I*x)

________________________________________________________________________________________

Maxima [A]  time = 2.14436, size = 35, normalized size = 1.09 \begin{align*} \frac{1}{4} \, \pi \log \left (x^{2} + 1\right ) + \frac{1}{2} i \,{\rm Li}_2\left (i \, x + 1\right ) - \frac{1}{2} i \,{\rm Li}_2\left (-i \, x + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(x)/(x^2+1),x, algorithm="maxima")

[Out]

1/4*pi*log(x^2 + 1) + 1/2*I*dilog(I*x + 1) - 1/2*I*dilog(-I*x + 1)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left (x\right )}{x^{2} + 1}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(x)/(x^2+1),x, algorithm="fricas")

[Out]

integral(log(x)/(x^2 + 1), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log{\left (x \right )}}{x^{2} + 1}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(x)/(x**2+1),x)

[Out]

Integral(log(x)/(x**2 + 1), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left (x\right )}{x^{2} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(x)/(x^2+1),x, algorithm="giac")

[Out]

integrate(log(x)/(x^2 + 1), x)